package com.ruoyi.camp.service.impl;

import java.util.List;

import com.ruoyi.common.utils.uuid.IdUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.camp.mapper.CFacilityMapper;
import com.ruoyi.camp.domain.CFacility;
import com.ruoyi.camp.service.ICFacilityService;

/**
 * 服务设施功能Service业务层处理
 * 
 * @author ruoyi
 * @date 2024-10-29
 */
@Service
public class CFacilityServiceImpl implements ICFacilityService 
{
    @Autowired
    private CFacilityMapper cFacilityMapper;

    /**
     * 查询服务设施功能
     * 
     * @param facilityId 服务设施功能主键
     * @return 服务设施功能
     */
    @Override
    public CFacility selectCFacilityByFacilityId(String facilityId)
    {
        return cFacilityMapper.selectCFacilityByFacilityId(facilityId);
    }

    /**
     * 查询服务设施功能列表
     * 
     * @param cFacility 服务设施功能
     * @return 服务设施功能
     */
    @Override
    public List<CFacility> selectCFacilityList(CFacility cFacility)
    {
        return cFacilityMapper.selectCFacilityList(cFacility);
    }

    /**
     * 新增服务设施功能
     * 
     * @param cFacility 服务设施功能
     * @return 结果
     */
    @Override
    public int insertCFacility(CFacility cFacility)
    {
        cFacility.setFacilityId(IdUtils.randomUUID());
        return cFacilityMapper.insertCFacility(cFacility);
    }

    /**
     * 修改服务设施功能
     * 
     * @param cFacility 服务设施功能
     * @return 结果
     */
    @Override
    public int updateCFacility(CFacility cFacility)
    {
        return cFacilityMapper.updateCFacility(cFacility);
    }

    /**
     * 批量删除服务设施功能
     * 
     * @param facilityIds 需要删除的服务设施功能主键
     * @return 结果
     */
    @Override
    public int deleteCFacilityByFacilityIds(String[] facilityIds)
    {
        return cFacilityMapper.deleteCFacilityByFacilityIds(facilityIds);
    }

    /**
     * 删除服务设施功能信息
     * 
     * @param facilityId 服务设施功能主键
     * @return 结果
     */
    @Override
    public int deleteCFacilityByFacilityId(String facilityId)
    {
        return cFacilityMapper.deleteCFacilityByFacilityId(facilityId);
    }
}
